package com.hhb.service.impl;

import com.hhb.dao.UserDao;
import com.hhb.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

//注解中的value可以省略不写，默认为类名首字母改小写

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    @Qualifier(value = "userDaoImpl")
    private UserDao userDao;

    @Override
    public void add() {
        System.out.println("userService add……");
        userDao.add();
    }
}
